package Controllers;

import Models.*;
import java.util.ArrayList;

/**
 * @author Erik
 */
public class MachineCTR
{
    private MachineCollection machines;

    public MachineCTR()
    {
        this.machines = MachineCollection.getInstance();
    }
    
    public Machine addMachine(String name)
    {
        Machine machine = new Machine(name);
        this.machines.addMachine(machine);
        return machine;
    }

    public ArrayList<Machine> findMachine(String name, boolean available)
    {
        return this.machines.findMachine(name, available);
    }

    public Machine getMachine(int id)
    {
        return this.machines.getMachine(id);
    }

	public ArrayList<Machine> getAllMachines()
	{
		return this.machines.getAllMachines();
	}

    public void removeMachine(Machine machine)
    {
        this.machines.removeMachine(machine);
    }
}
